package com.shunhe.storage.ui.adapter;

import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.ruitu.arad.base.base_list.ListBaseAdapter;
import com.ruitu.arad.base.base_list.SuperViewHolder;
import com.ruitu.arad.util.ToastUtils;
import com.shunhe.storage.R;
import com.shunhe.storage.dao.model.Goods;

public class ComGoodsListAdapter extends ListBaseAdapter<Goods> {

    public ComGoodsListAdapter(Context context) {
        super(context);
    }

    @Override
    public int getLayoutId() {
        return R.layout.item_goods_list_ch;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        TextView tv_add = holder.getView(R.id.tv_add);

        tv_add.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                ToastUtils.showShort("已添加");
                Activity activity = (Activity) mContext;
                activity.finish();
            }
        });
    }
}
